package nix.struts.api;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;

public class Demo3Action extends ActionSupport implements ServletRequestAware, ServletResponseAware {
	
	private HttpServletRequest request;
	private HttpServletResponse response;

	@Override
	public String execute() throws Exception {
				
		return SUCCESS;
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
		// 获得request
		this.request = request;
	}

	@Override
	public void setServletResponse(HttpServletResponse response) {
		// 获得response
		this.response = response;
	}
}
